Skip to content

Pull 13.4.1 changes into main - #2789

Open
mdboom wants to merge 26 commits into
NVIDIA:mainfrom
mdboom:13.4.x
Open

Pull 13.4.1 changes into main#2789
mdboom wants to merge 26 commits into
NVIDIA:mainfrom
mdboom:13.4.x

Conversation

@mdboom

@mdboom mdboom commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

This shows just the changes necessary to support CTK 13.4.1, compared against main. Should make #2788 easier to review.

mdboom and others added 7 commits July 28, 2026 23:35
* run_cybind_cython_gen 13.4.0 ../ctk-next-public-main-staging-2026-07-15+1105 (NO MANUAL CHANGES)

* run_cybind_native 13.4.0 ../ctk-next-public-main-staging-2026-07-15+1105 (NO MANUAL CHANGES)

* git merge --squash ctk-next-public-main-2026-07-15+1105-merge && git rm -r -f qa/ (NO MANUAL CHANGES)

* Regenerate cuda-core stubs after transfer preview (NO MANUAL CHANGES)

* Support CUDA prerelease packages in fetch-ctk

Resolve the public preview package set and extract it into the existing mini-toolkit layout while preserving stable redistributable behavior.

* Add focused CUDA 13.4 prerelease wheel build

Exercise one Linux x86_64 Python build through the existing wheel workflow without expanding the regular CI matrix.

* Prepare for CTK 13.4

* Update tests to handle hidden reserved fields

* Build CUDA 13.4 prerelease wheels in ordinary CI

* Fix dangling pointer issues

* Fix readonly and ownership bugs

* CTK 13.4 fixes

* Fix for CTK cache problem

* Fix union types

* Fix enum handling

* Fix enums

* Fix enum usage

* Extend CUDA 13.4 prerelease CI to all four build platforms

Windows preview toolkits ship as local installers rather than redistributable
archives, so teach fetch-ctk to download and extract them and re-enable
Windows wheel builds in the ordinary CI matrix, including a win-arm64 canary.

* Assemble Windows CUDA 13.4 preview mini-CTK from installer components

The local preview installer bundles per-component archives rather than a
flat CUDAToolkit tree, so extract the needed component directories with 7-Zip
and merge them into the layout fetch_ctk expects.

* Streamline Windows preview CTK extraction in fetch_ctk

Use a single 7-Zip pass, merge directly into the cache staging dir via a
separate work directory, and drop prerelease-only unit tests that CI already
exercises end to end.

* Fix Windows preview mini-CTK lib layout for linker.

Merge component libs into lib/x64 or lib/arm64 so cuda_bindings can find
cudart_static.lib, and bump the prerelease cache key to drop stale flat-lib entries.

* Drop layout-v2 cache key bump.

Stale Windows prerelease caches were purged manually; the lib/x64 merge fix
remains in fetch_ctk_redistrib.py.

* Build Windows ARM64 wheels across supported Python versions

Promote the successful canary to the full Python matrix and describe its CUDA 13-only wheel path as a single-major build.

* Fix installation of cuda compute sanitizer

* Fix for sanitizer-only install

* Remove build smoke test

---------

Co-authored-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
Co-authored-by: Andy Jost <ajost@nvidia.com>
* Add beta release notes

* Remove documented things that don't exist in the code

* Add all new content to release notes

* Fix NVML docs

* Revert "Bypass the doc check"

This reverts commit 9f0e5d5.

* Check for release notes on the tagged commit
@copy-pr-bot

copy-pr-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions Bot added CI/CD CI/CD infrastructure cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module cuda.pathfinder Everything related to the cuda.pathfinder module labels Sep 9, 2026
Comment thread cuda_bindings/docs/source/release/13.4.0-notes.rst
Comment thread cuda_bindings/docs/source/release/13.4.0b1-notes.rst
Comment thread cuda_bindings/docs/source/release/13.4.1-notes.rst
Comment thread cuda_bindings/docs/source/release/13.4.1a0-notes.rst
mdboom and others added 11 commits September 9, 2026 13:55
- Medium: [arch_check.py:84](/wrk/forked/pr2788/cuda_python_test_helpers/cuda_python_test_helpers/arch_check.py:84) converts the raw NVML architecture integer to DeviceArch while handling an expected unsupported call. An unknown future architecture raises ValueError instead of skipping. Restore cont7’s try/except and UNKNOWN(<id>) fallback.
…se None instead of specific DeviceArch values.

- Medium/low: [test_device.py:162](/wrk/forked/pr2788/cuda_bindings/tests/nvml/test_device.py:162) changed unsupported_before(device, None) to KEPLER. Mike’s pre-merge release branch and cont7 both use None; the adjacent getter does too. The current version propagates NotSupportedError on modern devices where the setter is unavailable.
@mdboom
mdboom marked this pull request as ready for review September 10, 2026 00:18
@mdboom mdboom self-assigned this Sep 10, 2026
@mdboom mdboom added this to the cuda.bindings 13.5.0 & 12.9.10 milestone Sep 10, 2026
@github-actions

Copy link
Copy Markdown

leofang added a commit to leofang/cupy that referenced this pull request Sep 10, 2026
CUDA gained Windows-on-Arm host support in CTK 13.4, so wire the
GHA build lane to also produce cupy-cuda13x win_arm64 wheels alongside
the existing linux-64 / linux-aarch64 / win-64 lanes.

Follows the NVIDIA/cuda-python#2789 pattern:

- New `build-win-arm64` job in ci.yml, gated on
  `startsWith(CUDA_BUILD_VER, '13.')` so pre-13.4 backport branches
  cleanly skip it.
- Uses only `CUDA_BUILD_VER` (there is no CUDA 12 x arm64 pairing).
- Python 3.10 is excluded on `win-arm64` -- CPython upstream has no
  official 3.10 Windows ARM64 build (nuget-cpython and
  actions/setup-python's manifest both drop it), so the matrix
  entry is unbuildable.
- Runner: `windows-11-arm` (GitHub-hosted).
- `fetch_ctk` action learns the `windows-arm64` redist subdir;
  supporting Python tools (`env-vars`, `prepare_wheel_build.py`,
  `wheel_configs.py`, `fetch_ctk_redistrib.py`) get the
  matching platform entries.
- cuTENSOR preload and rapidsai/sccache are skipped for `win-arm64`
  because NVIDIA has not yet shipped WoA cuTENSOR binaries and
  rapidsai/sccache has no WoA build. Both are marked in-code as
  temporary; re-enable when the upstreams catch up.
- No test/import step for `win-arm64` -- no GHA runner has an
  ARM64 GPU. This lane is build-only for now.
Comment thread .github/workflows/ci.yml
Comment on lines +52 to +77
# Windows ARM64 is available starting with CUDA 13.4.
if [[ "$cuda_build_ver" =~ ^([0-9]+)\.([0-9]+)(\.|$) ]]; then
cuda_build_major="${BASH_REMATCH[1]}"
cuda_build_minor="${BASH_REMATCH[2]}"
else
echo "Invalid CUDA build version: $cuda_build_ver" >&2
exit 1
fi
if (( cuda_build_major > 13 || (cuda_build_major == 13 && cuda_build_minor >= 4) )); then
windows_arm64_supported=true
else
windows_arm64_supported=false
fi
echo "windows_arm64_supported=$windows_arm64_supported" >> $GITHUB_OUTPUT

# No CUDA 13 windows-arm64 toolkit exists for a major other than the
# current one (windows-arm64 support started mid-way through the 13.x
# series), so cuda.core can only be built against a single CUDA major
# while the build major is still 13. Once the build major advances to
# 14, a CUDA 13 windows-arm64 toolkit will exist as the prior major.
if [[ "$cuda_build_major" == "13" ]]; then
windows_arm64_single_cuda_major=true
else
windows_arm64_single_cuda_major=false
fi
echo "windows_arm64_single_cuda_major=$windows_arm64_single_cuda_major" >> $GITHUB_OUTPUT

@leofang leofang Sep 10, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only use 1 CUDA major.minor to build in the main branch. Now that we bump the build floor I think this can be dropped and simplified.

Comment thread ci/tools/env-vars
Comment on lines +45 to +50
if [[ "${HOST_PLATFORM}" == "win-arm64" ]]; then
# cibuildwheel's `auto` architecture detection resolves to AMD64 on the
# windows-11-arm hosted runner (the Actions runner process itself reports
# AMD64 via emulation), so the target arch must be forced explicitly.
echo "CIBW_ARCHS=ARM64" >> $GITHUB_ENV
fi

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am very confused why this is needed. I would think cibuildwheels can figure it out. I don't have this in CuPy but it still works? cupy/cupy#10294

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD CI/CD infrastructure cuda.bindings Everything related to the cuda.bindings module cuda.core Everything related to the cuda.core module cuda.pathfinder Everything related to the cuda.pathfinder module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants